package com.kexinde.wjifen.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.kexinde.wjifen.model.NormalUser;

@Component("normalUserDao")
public class NormalUserDao extends BaseDao<NormalUser> {


	@SuppressWarnings("unchecked")
	public NormalUser findByName(String normalUserUserName) {
		List<NormalUser> users = hibernateTemplate
				.find("from NormalUser u where u.userName = '" + normalUserUserName + "'");
		if(null == users || users.size() == 0){
			return null;
		}
		return users.get(0);
	}

}
